package com.shelpe.services.sinbadgateway.entity.jpa;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import lombok.Data;

@Entity(name = "inprogress_auto_drivers")
@IdClass(InprogressAutoDriver.PK.class)
@Data
public class InprogressAutoDriver {
	@Id
	@Column(name="campaign_id")
	private long campaignID;
	@Id
	private int step;
	@Id
	private int chunk;
	
	@Column(name="product_ids")
	private String productIDs;
	
	private int executions = 0;
	@Column(name="success_count")
	private int success = 0;
	@Column(name="failure_count")
	private int failure = 0;
	private int done = 0;
	
	private int products = 1;
	
	private Date createdTime;
	private Date modifiedTime;
	
	@Data
	public static class PK implements Serializable{
		private static final long serialVersionUID = 5819978695472174875L;
		@Id
		@Column(name="campaign_id")
		private long campaignID;
		@Id
		private int step;
		@Id
		private int chunk;
	}
}
